#include<bits/stdc++.h>
using namespace std;
const int N=1e5+2;
int n,x,cnt,a[N],b[N],mx=INT_MIN;
int main(){
	freopen("duel.in","r",stdin);
	freopen("duel.out","w",stdout);
	scanf("%d",&n);
	for(int i=1;i<=n;i++){
		scanf("%d",&x);
		a[x]++;
		mx=max(mx,x);
	}
	for(int i=1;i<=mx;i++){
		if(a[i]){
			cnt++;
			b[cnt]=a[i]+b[cnt-1];
		}
	}
	for(int i=1;i<=cnt;i++){
		if(b[i]>=b[cnt]-b[i]){
			cout<<b[i]-b[i-1];
			break;
		}
	}
	return 0;
}
